home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 430_01 / m68kdis / mac / makeb.pl < prev    next >
Encoding:
Perl Script  |  1994-12-29  |  816 b   |  25 lines

  1. #!/usr/local/bin/perl
  2.  
  3. #                 Author:  Christopher G. Phillips
  4. #              Copyright (C) 1994 All Rights Reserved
  5. #
  6. #                              NOTICE
  7. #
  8. # Permission to use, copy, modify, and distribute this software and
  9. # its documentation for any purpose and without fee is hereby granted
  10. # provided that the above copyright notice appear in all copies and
  11. # that both the copyright notice and this permission notice appear in
  12. # supporting documentation.
  13. #
  14. # The author makes no representations about the suitability of this
  15. # software for any purpose.  This software is provided ``as is''
  16. # without express or implied warranty.
  17.  
  18. while (<>) {
  19.     if (/^Bytes ([0-9a-fA-F]+) to ([0-9a-fA-F]+)$/) {
  20.         printf("0x%lx\n", hex($1) - 4);
  21.         printf("0x%lx\n", hex($1));
  22.         printf("0x%lx\n", hex($2) + 1);
  23.     }
  24. }
  25.